﻿//
// *************************************************************************************
// WP-Framework
//
// Developed by 
// Lukas Kretschmar (lkretschmar.dev@bluewin.ch)
//
// Switzerland, Copyright (c) 2013 lkretschmar
// This content is released under the MIT License (http://opensource.org/licenses/MIT).
//     
// *************************************************************************************
//
//


using KretschIT.WP_Fx.EasyMoq.Calls.Collections.Items;
using System.Linq.Expressions;
using KretschIT.WP_Fx.Core.Converters;

namespace KretschIT.WP_Fx.EasyMoq.Calls.Functions
{
    internal class FunctionSetupItem<T> : SetupItem<IFunctionMock<T>>, IFunctionSetupItem<T>
    {
        public FunctionSetupItem(MethodCallExpression call, IFunctionMock<T> func)
            : base(call, func)
        {

        }

        public object Execute(T obj)
        {
            this.IncrementCallCounter();
            return this.Executable.Execute(obj);            
        }
    }
}
